<template>
  <div class="app-container shenqing">
    <!-- 查询 -->
    <div>
      <div class="container-module" style="padding-bottom: 0">
        <el-form :inline="true" class="search-form">
          <el-row :gutter="20">
            <el-col :span="20">
              <el-form-item label="审核类型：">
                <el-select v-model="searchForm.apply_type" placeholder="请选择审核类型">
                  <el-option v-for="item in CateList" :key="item.value" :label="item.label" :value="item.value">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="4" style="margin: 5px 0; text-align: right">
              <el-form-item>
                <el-button size="small" type="primary" icon="el-icon-search" @click="getListWay">查询</el-button>
                <el-button size="small" type="primary" icon="el-icon-refresh" @click="resettingWay">重置</el-button>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </div>
    </div>
    <el-divider></el-divider>
    <div class="grouping" style="margin-top: 20px">
      <div class="marginBottom">
        <el-row :gutter="20">
          <el-col :span="4" style="float: right">
            <div class="right-panel el-button-group">
              <el-button icon="el-icon-refresh" size="mini" @click="resettingWay"></el-button>
              <el-dropdown trigger="click" :hide-on-click="false">
                <span class="el-dropdown-link">
                  <el-button icon="el-icon-s-operation" size="mini"></el-button>
                </span>
                <el-dropdown-menu slot="dropdown">
                  <el-dropdown-item v-for="fruit in allTableThead" :key="fruit">
                    <el-checkbox v-model="checkboxTableThead" :label="fruit">{{
                      tableTheadOptions[fruit].label
                    }}</el-checkbox>
                  </el-dropdown-item>
                </el-dropdown-menu>
              </el-dropdown>
            </div>
          </el-col>
        </el-row>
      </div>
      <el-row :gutter="30">
        <el-col>
          <el-table v-loading="loading" :header-cell-style="{
              'background-color': '#f3f8fe',
              color: '#606266',
              height: '50px',
            }" highlight-current-row :data="dictionaryList" style="width: 100%">
            <el-table-column v-for="fruit in tableThead" :key="fruit" :label="tableTheadOptions[fruit].label"
              align="center">
              <template slot-scope="scope">
                <div>
                  <el-tooltip placement="top-start" :content="scope.row[fruit] + ''">
                    <div class="one_line_hidden">
                      {{ scope.row[fruit] ? scope.row[fruit] : "-" }}
                    </div>
                  </el-tooltip>
                </div>
              </template>
            </el-table-column>

            <!-- <el-table-column prop="id" align="center" label="ID">
            </el-table-column>
            <el-table-column prop="created_at" align="center" label="申请时间">
            </el-table-column>
            <el-table-column prop="updated_at" align="center" label="更新时间">
            </el-table-column> -->
            <el-table-column prop="apply_info.basic.name" align="center" label="商户名称">
            </el-table-column>
            <el-table-column prop="apply_info.basic.user_name" align="center" label="联系人姓名">
            </el-table-column>
            <el-table-column prop="apply_info.basic.user_cellphone" align="center" label="联系人手机号">
            </el-table-column>
            <!-- <el-table-column
              prop="apply_info.company.name"
              align="center"
              label="单位名称"
            >
            </el-table-column> -->
            <el-table-column prop="apply_typeText" align="center" label="审核类型">
              <template slot-scope="scope">
                <el-tag type="warning" v-if="scope.row.apply_type == 1">
                  申请入驻
                </el-tag>
                <el-tag v-if="scope.row.apply_type == 2"> 资料修改 </el-tag>
              </template>
            </el-table-column>

            <el-table-column prop="ziliao" fixed="right" align="center" width="130px" label="申请资料">
              <template slot-scope="scope">
                <el-button size="mini" type="text" icon="el-icon-view"
                  @click="putDictionaryWay(scope.row)">查看申请资料</el-button>
              </template>
            </el-table-column>
            <el-table-column fixed="right" align="center" width="130" prop="address" label="操作">
              <template slot-scope="scope">
                <span v-if="scope.row.apply_status == 1">
                  <el-popconfirm title="确定要审核通过该申请码？" @confirm="delDictionaryWay(scope.row, 2)">
                    <el-button v-hasPermi="'merchantapply/shenhe'" type="success" size="mini" slot="reference">
                      同意
                    </el-button>
                  </el-popconfirm>
                  <el-popconfirm title="确定要驳回该申请吗？" @confirm="delDictionaryWay(scope.row, 3)">
                    <el-button v-hasPermi="'merchantapply/shenhe'" style="margin-left: 10px" type="danger" size="mini"
                      slot="reference">
                      驳回
                    </el-button>
                  </el-popconfirm>
                </span>
                <el-tag type="success" v-if="scope.row.apply_status == 2">
                  已通过
                </el-tag>
                <el-tag type="danger" v-if="scope.row.apply_status == 3">
                  已驳回
                </el-tag>
              </template>
            </el-table-column>
          </el-table>
        </el-col>
      </el-row>
      <el-row class="marginTop" style="text-align: right">
        <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
          :current-page="searchForm.page" :page-sizes="[10, 20, 30, 40]" :page-size="searchForm.count"
          layout="total, sizes, prev, pager, next, jumper" :total="total">
        </el-pagination>
      </el-row>
    </div>
    <el-dialog :close-on-click-modal="false" title="填写备注" :visible.sync="isShopRebark" width="700px"
      @close="closeDialogdictionary">
      <el-row :gutter="20">
        <el-form :model="dictionaryForm" status-icon ref="dictionaryForm" label-width="110px" class="demo-ruleForm">
          <el-col :span="22">
            <el-form-item label="备注" prop="remark">
              <el-input type="textarea" placeholder="请输入备注" v-model="remark" autocomplete="off"></el-input>
            </el-form-item>
          </el-col>
        </el-form>
      </el-row>
      <span slot="footer" class="dialog-footer">
        <el-button :loading="btnLoading" @click="isShopRebark = false">
          取 消
        </el-button>
        <el-button :loading="btnLoading" type="primary" @click="submitShopRebark('dictionaryForm')">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 详情 -->
    <el-drawer :modal-append-to-body="false" :append-to-body="true" title="信息详情" size="70%" :withHeader="false"
      :visible.sync="dialogdictionary" @close="clomerchant_info" :show-close="true">
      <div class="drawerTitle">
        <span>信息详情</span>
        <div class="close" @click="clomerchant_info">
          <i class="el-icon-close" style="font-size: 24px;"></i>
        </div>
      </div>
      <el-scrollbar wrap-style="overflow-x:hidden;" style="height: calc(100vh - 130px)">
        <div style="padding: 10px 20px;">
          <div class="infoDiv">
            <!-- <div class="img" style="overflow: hidden">
            <el-image style="width: 100%; height: 100%" src="" fit="cover"></el-image>
          </div> -->
            <div class="scenter">
              <div class="order_center">
                <div>
                  <div class="orderdetail_item">
                    <p>商户名称：</p>
                    <p>
                      {{ dictionaryForm.basic ? dictionaryForm.basic.name : "-" }}
                    </p>
                  </div>
                  <div class="orderdetail_item">
                    <p>商户类型：</p>
                    <p v-if="typeForm.type == 1">
                      个人
                    </p>
                    <p v-if="typeForm.type == 2">
                      经营个体/商户
                    </p>
                    <p v-if="typeForm.type == 3">
                      企业
                    </p>
                  </div>
                </div>
                <div>
                  <div class="orderdetail_item">
                    <p>联系人：</p>
                    <p>
                      {{ dictionaryForm.basic ? dictionaryForm.basic.user_name : "-" }}
                    </p>
                  </div>
                  <div class="orderdetail_item">
                    <p>商户类目：</p>
                    <p>
                      {{ dictionaryForm.basic ? dictionaryForm.basic.mer_cate_txt : "-" }}
                    </p>
                  </div>
                </div>
                <div>
                  <div class="orderdetail_item">
                    <p>联系人：</p>
                    <p>
                      {{ dictionaryForm.basic ? dictionaryForm.basic.user_name : "-" }}
                    </p>
                  </div>
                  <div class="orderdetail_item">
                    <p>覆盖区域：</p>
                    <p>
                      {{ userInfo.province_id }}{{ userInfo.city_id
                   }}{{ userInfo.county_id }}
                    </p>
                  </div>
                </div>
                <div>
                </div>
              </div>
            </div>
            <!--  -->
            <div class="right">
              <div class="order_center">
                <div class="orderdetail_item">
                  <p>状态：</p>
                  <p style="color:#567722;font-weight: 550;">
                    {{
                  shopDetatilObj.apply_status == 1
                  ? '未审核'
                  : "启用"
                }}
                  </p>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div style="padding: 0 20px; position: relative" v-loading="subLoading">
          <el-tabs v-model="activeNames" @tab-click="infotabshandleClick">
            <el-tab-pane label="基本信息" name="基本信息">
            </el-tab-pane>
            <el-tab-pane label="认证信息" name="认证信息">
            </el-tab-pane>
            <el-tab-pane label="法人负责人" name="法人负责人">
            </el-tab-pane>
            <el-tab-pane label="品牌授权" name="品牌授权">
            </el-tab-pane>
            <!-- <el-tab-pane label="收款信息" name="收款信息">
          </el-tab-pane> -->
          </el-tabs>
          <div v-if="activeNames == '基本信息'">
            <el-descriptions :column="2">
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="Logo">
                <div v-if="dictionaryForm.basic && dictionaryForm.basic.logo_image" style="
                  width: 60px;
                  height: 60px;
                  overflow: hidden;
                  border-radius: 5px;
                ">
                  <el-image style="width: 60px; height: 60px" fit="cover" :src="
                    dictionaryForm.basic ? dictionaryForm.basic.logo_image : ''
                  " :preview-src-list="[
                    dictionaryForm.basic ? dictionaryForm.basic.logo_image : '',
                  ]" />
                </div>
                <div v-else>无</div>
              </el-descriptions-item>
              <!-- <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="店铺背景">
                <div style="
                  width: 60px;
                  height: 60px;
                  overflow: hidden;
                  border-radius: 5px;
                ">
                  <el-image style="width: 60px; height: 60px" fit="cover" :src="
                    dictionaryForm.basic ? dictionaryForm.basic.logo_image : ''
                  " :preview-src-list="[
                    dictionaryForm.basic ? dictionaryForm.basic.logo_image : '',
                  ]" />
                </div>
              </el-descriptions-item> -->
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="商户名称">
                {{ dictionaryForm.basic ? dictionaryForm.basic.name : "-" }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="店铺类目">
                {{ dictionaryForm.basic ? dictionaryForm.basic.mer_cate_txt : "-" }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="店铺类型">
                <span v-if="typeForm.type == 1">
                  个人
                </span>
                <span v-if="typeForm.type == 2">
                  经营个体/商户
                </span>
                <span v-if="typeForm.type == 3">
                  企业
                </span>
              </el-descriptions-item>
              <!-- <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel" label="开店时间">
              {{ dictionaryForm.basic ? dictionaryForm.basic.start_time : "-" }}
            </el-descriptions-item> -->
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="联系人">
                {{ dictionaryForm.basic ? dictionaryForm.basic.user_name : "-" }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="联系电话">
                {{
                dictionaryForm.basic ? dictionaryForm.basic.user_cellphone : "-"
              }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="省市区">
                {{ userInfo.province_id }}{{ userInfo.city_id
              }}{{ userInfo.county_id }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="详细地址">
                {{ userInfo.region?userInfo.region : '-' }}
              </el-descriptions-item>
            </el-descriptions>
            <div class="informationTitleView">
              <div class="leftBox" style="padding-left: 0px;">
                <div class="leftborder"></div>
                <div class="text">关联账户</div>
              </div>
              <div class="right"></div>
            </div>
            <el-descriptions :column="2">
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="账号ID">
                {{ userInfo.id }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="登录账户">
                {{ userInfo.mobile }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="创建时间">
                {{ userInfo.created_at }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="更新时间">
                {{ userInfo.updated_at }}
              </el-descriptions-item>
            </el-descriptions>
          </div>
          <!--  -->
          <div v-if="activeNames == '认证信息'">
            <div class="informationTitleView">
              <div class="leftBox" style="padding-left: 0px;">
                <div class="leftborder"></div>
                <div class="text">认证信息</div>
              </div>
              <div class="right"></div>
            </div>
            <el-descriptions class="margin-top" :column="2" size="mini">
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="商户类型">
                {{ dictionaryForm.basic ? dictionaryForm.basic.name : "" }}
              </el-descriptions-item>
              <!-- <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel" label="开店时间">
              {{ dictionaryForm.basic ? dictionaryForm.basic.start_time : "" }}
            </el-descriptions-item> -->
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="主体名称">
                {{ dictionaryForm.basic ? dictionaryForm.basic.name : "" }}
              </el-descriptions-item>
              <!-- <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel" label="信用代码">
              {{
                dictionaryForm.company
                  ? dictionaryForm.company.social_unified_credit_code
                  : ""
              }}
            </el-descriptions-item> -->
              <!-- <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel" label="执照地区">
              {{
                dictionaryForm.company
                  ? dictionaryForm.company.business_license_address
                  : ""
              }}
            </el-descriptions-item> -->
              <!-- <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel" label="营业期限">
              {{
                dictionaryForm.company
                  ? dictionaryForm.company.business_expiration_time
                  : ""
              }}
            </el-descriptions-item> -->
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="省市区">
                {{dictionaryForm.basic && dictionaryForm.basic.address ? dictionaryForm.basic.address : '-'}}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="联系方式">
                {{
                dictionaryForm.basic ? dictionaryForm.basic.user_cellphone : ""
              }}
              </el-descriptions-item>

              <!-- <el-descriptions-item label="店铺类目">
              {{ dictionaryForm.basic ? dictionaryForm.basic.mer_cate_id : "" }}
            </el-descriptions-item> -->
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel" :span="2"
                label="介绍">
                {{ dictionaryForm.basic ? dictionaryForm.basic.description : "" }}
              </el-descriptions-item>
              <!-- <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel" label="营业执照">
              <div style="
                  width: 60px;
                  height: 60px;
                  overflow: hidden;
                  border-radius: 5px;
                ">
                <el-image style="width: 60px; height: 60px" fit="cover" :src="
                    dictionaryForm.company
                      ? dictionaryForm.company.duplicate_of_business_license
                      : '-'
                  " :preview-src-list="[
                    dictionaryForm.company
                      ? dictionaryForm.company.duplicate_of_business_license
                      : '',
                  ]" />
              </div>
            </el-descriptions-item> -->
            </el-descriptions>
            <div class="informationTitleView">
              <div class="leftBox" style="padding-left: 0px;">
                <div class="leftborder"></div>
                <div class="text">单位信息</div>
              </div>
              <div class="right"></div>
            </div>
            <el-descriptions class="margin-top" :column="2">
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="单位名称">
                {{ dictionaryForm.company ? dictionaryForm.company.name : "" }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="信用代码">
                {{
                dictionaryForm.company
                  ? dictionaryForm.company.social_unified_credit_code
                  : ""
              }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="营业期限">
                {{
                dictionaryForm.company
                  ? dictionaryForm.company.business_expiration_time
                  : ""
              }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="期限时间">
                {{
                dictionaryForm.company
                  ? dictionaryForm.company.start_time+'-'+dictionaryForm.company.end_time
                  : ""
              }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="单位电话">
                {{
                dictionaryForm.company
                  ? dictionaryForm.company.office_cellphone
                  : ""
              }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="执照地区">
                {{
                dictionaryForm.company
                  ? dictionaryForm.company.business_license_address
                  : ""
              }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="单位类型">
                <span v-if="dictionaryForm.company.type == 1">有限责任公司</span>
                <span v-if="dictionaryForm.company.type == 2">无限公司</span>
                <span v-if="dictionaryForm.company.type == 3">两和公司</span>
                <span v-if="dictionaryForm.company.type == 4">.股份有限公司</span>
                <span v-if="dictionaryForm.company.type == 5">.股份两和公司</span>
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="单位地区">
                {{ dictionaryForm.basic ? dictionaryForm.company.province_id : ""
              }}{{ dictionaryForm.company ? dictionaryForm.company.city_id : ""
              }}{{
                dictionaryForm.company ? dictionaryForm.company.county_id : ""
              }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="详细地址">
                {{ dictionaryForm.company ? dictionaryForm.company.address : "" }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="营业执照">
                <div v-if="dictionaryForm.company && dictionaryForm.company.duplicate_of_business_license" style="
                  width: 60px;
                  height: 60px;
                  overflow: hidden;
                ">
                  <el-image style="width: 60px; height: 60px" fit="cover" :src="
                    dictionaryForm.company && dictionaryForm.company.duplicate_of_business_license
                      ? dictionaryForm.company.duplicate_of_business_license
                      : ''
                  " :preview-src-list="[
                    dictionaryForm.company
                      ? dictionaryForm.company.duplicate_of_business_license
                      : '',
                  ]" />
                </div>
                <div v-else>无</div>
              </el-descriptions-item>
            </el-descriptions>
          </div>
          <!--  -->
          <div v-if="activeNames == '法人负责人'">
            <div class="informationTitleView">
              <div class="leftBox" style="padding-left: 0px;">
                <div class="leftborder"></div>
                <div class="text">法人信息</div>
              </div>
              <div class="right"></div>
            </div>
            <el-descriptions class="margin-top" :column="2" size="mini">
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="法人姓名">
                {{
                dictionaryForm.legal_person
                  ? dictionaryForm.legal_person.name
                  : ""
              }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="证件类型">
                <span v-if="dictionaryForm.legal_person.certificate_type == 1">身份证</span>
                <span v-if="dictionaryForm.legal_person.certificate_type == 2">军官证</span>
                <span v-if="dictionaryForm.legal_person.certificate_type == 3">护照</span>
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="证件号">
                {{
                dictionaryForm.legal_person
                  ? dictionaryForm.legal_person.certificate_no
                  : ""
              }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="联系方式">
                {{
                dictionaryForm.legal_person
                  ? dictionaryForm.legal_person.cellphone
                  : ""
              }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="证件期限">
                <span v-if="dictionaryForm.legal_person.id_card_time_type == 1">长期</span>
                <span v-if="dictionaryForm.legal_person.id_card_time_type == 2">短期</span>
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="有效期">
                {{
                dictionaryForm.legal_person
                  ? dictionaryForm.legal_person.id_card_time
                  : ""
              }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="身份证-反">
                <div v-if="dictionaryForm.legal_person && dictionaryForm.legal_person.id_card_front" style="
                  width: 60px;
                  height: 60px;
                  overflow: hidden;
                ">
                  <el-image style="width: 60px; height: 60px" fit="cover" :src="
                    dictionaryForm.legal_person
                      ? dictionaryForm.legal_person.id_card_front
                      : ''
                  " :preview-src-list="[
                    dictionaryForm.legal_person
                      ? dictionaryForm.legal_person.id_card_front
                      : '',
                  ]" />
                </div>
                <div v-else>无</div>
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="身份证-正">
                <div v-if="dictionaryForm.legal_person && dictionaryForm.legal_person.id_card_reverse" style="
                  width: 60px;
                  height: 60px;
                  overflow: hidden;
                ">
                  <el-image style="width: 60px; height: 60px" fit="cover" :src="
                    dictionaryForm.legal_person
                      ? dictionaryForm.legal_person.id_card_reverse
                      : ''
                  " :preview-src-list="[
                    dictionaryForm.legal_person
                      ? dictionaryForm.legal_person.id_card_reverse
                      : '',
                  ]" />
                </div>
                <div v-else>无</div>
              </el-descriptions-item>
            </el-descriptions>
          </div>
          <!--  -->
          <div v-if="activeNames == '品牌授权'">
            <div class="informationTitleView">
              <div class="leftBox" style="padding-left: 0px;">
                <div class="leftborder"></div>
                <div class="text">经营状况</div>
              </div>
              <div class="right"></div>
            </div>
            <el-descriptions class="margin-top" :column="2">
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="成立时间">
                {{
                dictionaryForm.profile
                  ? dictionaryForm.profile.brand_establishment_time
                    ? dictionaryForm.profile.brand_establishment_time
                    : "未填写"
                  : "未填写"
              }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="品牌定位">
                {{
                dictionaryForm.profile
                  ? dictionaryForm.profile.positioning
                    ? dictionaryForm.profile.positioning
                    : "未填写"
                  : "未填写"
              }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="受众人群">
                {{
                dictionaryForm.profile
                  ? dictionaryForm.profile.target_user
                    ? dictionaryForm.profile.target_user
                    : "未填写"
                  : "未填写"
              }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="爆品链接" :span="3">
                {{
                dictionaryForm.profile
                  ? dictionaryForm.profile.explosive_product_id
                    ? dictionaryForm.profile.explosive_product_id
                    : "未填写"
                  : "未填写"
              }}
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="单位规模">
                <div v-if="dictionaryForm.profile && dictionaryForm.profile.images.length" style="
                  width: 60px;
                  height: 60px;
                  border-radius: 5px;
                  overflow: hidden;
                ">
                  <el-image style="width: 60px; height: 60px" fit="cover" :src="
                    dictionaryForm.profile ? dictionaryForm.profile.images : ''
                  " :preview-src-list="[
                    dictionaryForm.profile ? dictionaryForm.profile.images : '',
                  ]" />
                </div>
                <div v-else>无</div>
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="入驻承诺书">
                <div v-if="dictionaryForm.profile && dictionaryForm.profile.resident_commitment" style="
                  width: 60px;
                  height: 60px;
                  border-radius: 5px;
                  overflow: hidden;
                ">
                  <el-image style="width: 60px; height: 60px" fit="cover" :src="
                    dictionaryForm.profile
                      ? dictionaryForm.profile.resident_commitment
                      : ''
                  " :preview-src-list="[
                    dictionaryForm.profile
                      ? dictionaryForm.profile.resident_commitment
                      : '',
                  ]" />
                </div>
                <div v-else>无</div>
              </el-descriptions-item>
              <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel"
                label="授权承诺书">
                <div v-if="dictionaryForm.profile && dictionaryForm.profile.brand_authorization" style="
                  width: 60px;
                  height: 60px;
                  border-radius: 5px;
                  overflow: hidden;
                ">
                  <el-image style="width: 60px; height: 60px" fit="cover" :src="
                    dictionaryForm.profile
                      ? dictionaryForm.profile.brand_authorization
                      : ''
                  " :preview-src-list="[
                    dictionaryForm.profile
                      ? dictionaryForm.profile.brand_authorization
                      : '',
                  ]" />
                </div>
                <div v-else>无</div>
              </el-descriptions-item>
            </el-descriptions>
          </div>
          <!-- <div v-if="activeNames == '收款信息'">
          <div class="informationTitleView">
            <div class="leftBox" style="padding-left: 0px;">
              <div class="leftborder"></div>
              <div class="text">收款信息</div>
            </div>
            <div class="right"></div>
          </div>
        <el-descriptions class="margin-top" :column="2">
          <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel" label="收款类型">
            <span v-if="dictionaryForm.collection.type == 1">银行卡</span>
            <span v-if="dictionaryForm.collection.type == 2">支付宝</span>
            <span v-if="dictionaryForm.collection.type == 3">微信</span>
            <span v-if="dictionaryForm.collection.type == 4">公账</span>
          </el-descriptions-item>
          <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel" label="银行名称">
            {{
              dictionaryForm.collection
                ? dictionaryForm.collection.bank_name
                : ""
            }}
          </el-descriptions-item>
          <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel" label="开户账号">
            {{
              dictionaryForm.collection
                ? dictionaryForm.collection.bank_card_number
                : ""
            }}
          </el-descriptions-item>
          <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel" label="开户行">
            {{
              dictionaryForm.collection
                ? dictionaryForm.collection.bank_branch
                : ""
            }}
          </el-descriptions-item>
          <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel" label="开户者名字">
            {{
              dictionaryForm.collection
                ? dictionaryForm.collection.bank_user_name
                : ""
            }}
          </el-descriptions-item>
          <el-descriptions-item labelClassName="descriptionsLabel" content-class-name="descriptionsLabel" label="预留手机号">
            {{
              dictionaryForm.collection
                ? dictionaryForm.collection.reserve_cellphone
                : ""
            }}
          </el-descriptions-item>
        </el-descriptions>
         </div> -->
        </div>
      </el-scrollbar>
      <div v-if="shopDetatilObj.apply_status == 1" style="text-align: right;padding-right: 30px;">
        <el-popconfirm title="确定要审核通过该申请吗?" @confirm="delDictionaryWay(shopDetatilObj, 2)">
          <el-button v-hasPermi="'merchantapply/shenhe'" type="success" slot="reference">
            同意
          </el-button>
        </el-popconfirm>
        <el-popconfirm title="确定要驳回该申请吗?" @confirm="delDictionaryWay(shopDetatilObj, 3)">
          <el-button v-hasPermi="'merchantapply/shenhe'" style="margin-left: 10px" type="danger" slot="reference">
            驳回
          </el-button>
        </el-popconfirm>
      </div>
    </el-drawer>
  </div>
</template>

<script>
  import {
    merchantApply,
    merchantAudit,
    getApplyDetail,
  } from "@/api/merchant/index";
  const tableTheadOption = {
    id: {
      label: "ID",
      field: "id",
    },
    created_at: {
      label: "申请时间",
      field: "created_at",
    },
    updated_at: {
      label: "更新时间",
      field: "updated_at",
    },
    remark: {
      label: "备注",
      field: "remark",
    },
  };
  const allTableThead = [
    "id",
    "created_at",
    "updated_at",
    "remark"
  ];
  const defaultTableThead = [
    "id",
    "created_at",
    "updated_at",
    "remark"
  ];
  export default {
    data() {
      return {
        typeForm: {}, //商户类型
        activeNames: '基本信息',
        // 默认表头
        tableTheadOptions: tableTheadOption,
        allTableThead: allTableThead,
        tableThead: defaultTableThead, // 默认表头
        checkboxTableThead: defaultTableThead, // 默认表头值
        loading: false,
        isShopRebark: false,
        btnLoading: false,
        dialogdictionary: false,
        activeName: "商户信息", //订单类型
        subLoading: false,
        detailsLoading: false,
        direction: "rtl", //抽屉的出来形式
        CateList: [{
            label: "申请入驻",
            value: 1,
          },
          {
            label: "商户资料修改",
            value: 2,
          },
        ],
        shopDetatil: {},
        shopDetatilObj: {},
        searchForm: {
          // name: '',
          apply_type: "",
          apply_status: "",
          page: 1,
          count: 10,
        },
        remark: "",
        userInfo: {},
        type: "",
        dictionaryForm: {
          company: {
            type: "",
          },
          collection: {
            type: "",
          },
          legal_person: {
            certificate_type: "",
            id_card_time_type: "",
          },
        },
        dictionaryList: [],
        total: 0,
      };
    },
    created() {
      this.getListWay();
    },
    methods: {
      //关闭查看资料
      clomerchant_info() {

        this.dialogdictionary = false
        this.typeForm = {}
        this.userInfo = {}
        this.dictionaryForm = {
          company: {
            type: "",
          },
          collection: {
            type: "",
          },
          legal_person: {
            certificate_type: "",
            id_card_time_type: "",
          }
        }
      },
      // 查询商户申请管理
      getListWay() {
        this.loading = true;
        merchantApply(this.searchForm)
          .then((res) => {
            this.loading = false;
            if (res.code !== 200) {
              this.$messages.error(res.msg);
              return;
            }
            this.total = res.data.total;
            this.dictionaryList = res.data.list;
          })
          .catch(() => {
            this.loading = false;
          });
      },
      // 商户分类重置搜索
      resettingWay() {
        this.searchForm = {
          name: "",
          page: 1,
          count: 10,
        };
        this.getListWay();
      },
      // 添加修挂弹框关闭
      closeDialogdictionary() {
        this.$refs.dictionaryForm.resetFields();
        this.dialogdictionary = false;
        this.dictionaryForm = {
          id: "",
          name: "",
          demand: "",
          security_deposit: "",
          lnstructions: "",
          remark: "",
        };
      },
      infotabshandleClick() {

      },
      // 商户审核
      delDictionaryWay(row, index) {
        this.isShopRebark = true;
        this.shopDetatil = row;
        this.shopDetatil.index = index;
      },
      // 商户审核
      submitShopRebark() {
        if (!this.remark) {
          this.$messages.success("备注为空");
          return;
        }
        this.btnLoading = true;
        merchantAudit({
          id: this.shopDetatil.id,
          apply_status: this.shopDetatil.index,
          remark: this.remark,
        }).then((res) => {
          if (res.code == 200) {
            this.$messages.success(res.msg);
            this.btnLoading = false;
            this.isShopRebark = false;
            this.remark = ''
            this.getListWay();
            this.putDictionaryWay(this.shopDetatil);
          } else {
            this.btnLoading = false;
            this.isShopRebark = false;
            this.$messages.error(res.msg);
          }
        });
      },
      // 修改 商户分类
      putDictionaryWay(row) {
        this.shopDetatilObj = row;
        this.dialogdictionary = true;
        this.subLoading = true;
        setTimeout(() => {
          getApplyDetail({
              id: row.id
            })
            .then((res) => {
              this.subLoading = false;
              this.typeForm = res.data;
              this.dictionaryForm = res.data.apply_info;
              this.userInfo = res.data.user;
              // 0系统添加 1app注册 2小程序注册
              this.userInfo.source =
                this.userInfo.source == 0 ? "后台系统添加" : "用户自主注册";
            })
            .catch(() => {
              this.$messages.error("获取数据失败,请重试");
              this.subLoading = false;
              this.dialogdictionary = false;
            });
        }, 1000);
      },
      // 商户分类切换分页
      handleCurrentChange(val) {
        this.searchForm.page = val;
        this.getListWay();
      },
      // 商户分类切换每页数量
      handleSizeChange(val) {
        this.searchForm.count = val;
        this.getListWay();
      },
    },
  };
</script>

<style lang="scss">
  .informationTitleView {
    margin: 6px 0 15px 0 !important;
  }

  .shenqing {
    .title {
      color: rgba(0, 0, 0, 0.85);
      font-weight: 500;
      font-size: 16px;
      line-height: 16px;
    }

    .sn {
      color: #606266;
      font-size: 13px;
    }

    .demo-table-expand {
      display: flex;
      justify-content: start;
      flex-wrap: wrap;
      color: #515a6e;

      div {
        width: 30%;
        height: 40px;
        text-align: center;
        line-height: 40px;
        font-size: 12px;
      }
    }

    .marginTop {
      padding: 0 15px !important;
    }

    .sn {
      color: #606266;
      font-size: 13px;
    }

    .input-with-select .el-select .el-input {
      width: 110px !important;
    }

    .input-with-select .el-input-group__prepend {
      background-color: #fff;
    }

    #editinput .el-select .el-input {
      width: 440px !important;
    }

    .titleBox {
      font-size: 18px;
      font-weight: 700;
      color: #72767b;
    }

    .userInfoBox {
      padding: 10px;

      .imageBox {
        width: 70px;
        height: 70px;
        border-radius: 50%;
        overflow: hidden;
        background-color: #000;
      }
    }

    .el-form-item--small.el-form-item {
      margin-bottom: 10px !important;
    }

    .el-drawer__close-btn {
      position: absolute;
      right: 30px;
      top: 30px;
    }

    .subTitle {
      font-size: 16px;
      font-weight: 400;
      border-bottom: 2px solid #dfe4ed;
      padding-bottom: 10px;
      padding-left: 10px;
      position: relative;

      &::before {
        content: "";
        position: absolute;
        top: 0px;
        left: 0px;
        height: 18px;
        width: 3px;
        background-color: #1890ff;
      }
    }

    .margin-top {
      margin-top: 30px;
    }
  }

  .order_center {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 50px 0 0;
    font-size: 13px;
    color: #666;
  }

  .infoDiv {
    display: flex;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid #F5F5F5;

    .img {
      width: 65px;
      height: 65px;
      border-radius: 50%;
      background-color: #fff;
    }

    .scenter {
      flex: 1;
      margin-left: 10px;
    }
  }

  .orderdetail_item {
    display: flex;
    font-size: 14px;
    justify-content: start;
    margin-right: 30px;
    height: 40px;

    p:nth-child(2) {
      color: #000;
      font-weight: 550;
      margin-left: 15px;
    }
  }
</style>
